package com.xiashitech.apiservice.api;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import com.xiashitech.apiservice.service.IAgentConfigService;
import com.xiashitech.interfaces.agent.dto.AgentConfigDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/v1/agent")
@RequiredArgsConstructor(onConstructor =@_(@Autowired))
public class AgentConfigController {
    private static final Log log = LogFactory.get();

    private final IAgentConfigService agentConfigService;

    @RequestMapping(value = "/syncConfig", method = RequestMethod.POST)
    @ResponseBody
    public AgentConfigDTO syncConfig() {
        return agentConfigService.syncConfig();
    }
}
